package com.xujiakai.car.maintain.application.service.impl;

import com.xujiakai.car.maintain.application.service.IUserValidateService;
import com.xujiakai.car.maintain.domain.entity.Account;
import com.xujiakai.car.maintain.userinterface.views.AccrodingPanel;
import com.xujiakai.car.maintain.userinterface.views.LoginBean;
import com.xujiakai.car.maintain.userinterface.vo.AccountVO;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class UserValidateService implements IUserValidateService {

	public static final Logger logger = LoggerFactory.getLogger(UserValidateService.class);

	@Resource
	Account accountEntity;

	/**
	 * 根据账号里面的username和password查询用户的信息
	 */
	@Override
	public LoginBean userislawable(AccountVO account) {
		return accountEntity.userislawable(account);
	}

	/**
	 * 查询用户所有的权限
	 */
	@Override
	public AccrodingPanel queryUserPrivleges(AccountVO accountvo) {
		return accountEntity.queryUserPrivleges(accountvo);
	}

}
